<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>基于行/列的基本定位方法</title>
    <style>
      body {
        padding: 20px;
        font: 1em Helvetica Neue, Helvetica, Arial, sans-serif;
      }
      * {
        box-sizing: border-box;
      }
      p {
        margin: 0 0 1em 0;
      }

      .container {
        width: 500px;
        border: 5px solid rgb(111, 41, 97);
        border-radius: 0.5em;
        padding: 10px;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-gap: 20px;
      }
      .container > div {
        padding: 10px;
        background-color: rgba(111, 41, 97, 0.3);
        border: 2px solid rgba(111, 41, 97, 0.5);
      }

      .one {
        grid-column: 1 / 4;
        grid-row: 1;
      }
      .two {
        grid-column: 1/3;
        grid-row: 2;
      }
      .three {
        grid-column: 2/ 4;
        grid-row: 2/5;
      }
      .four {
        grid-column: 1;
        grid-row: 4;
      }
      .five {
        grid-column: 3;
        grid-row: 4/5;
      }
    </style>
  </head>
  <body>
    <div class="container">
      <div class="one">1</div>
      <div class="two">2</div>
      <div class="three">3</div>
      <div class="four">4</div>
      <div class="five">5</div>
    </div>
  </body>
</html>
